home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mntlib25 / alphasor.c < prev    next >
C/C++ Source or Header  |  1992-09-05  |  299b  |  17 lines

  1. /*
  2. **  ALPHASORT
  3. **  Trivial sorting predicate for scandir; puts entries in alphabetical order.
  4. */
  5.  
  6. #include <types.h>
  7. #include <dirent.h>
  8. #include <string.h>
  9.  
  10. int
  11. alphasort(d1, d2)
  12.     struct dirent    **d1;
  13.     struct dirent    **d2;
  14. {
  15.     return strcmp(d1[0]->d_name, d2[0]->d_name);
  16. }
  17.